package com.xiao.newfarm.controller;

import com.xiao.newfarm.model.User;
import com.xiao.newfarm.service.IUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author xiaoxiaoping
 * @Date 2020/5/31 17:30
 * @Version 1.0
 */
@RestController
@RequestMapping("/index")
public class UserController {
	@Resource
	private IUserService userService;
	
	@GetMapping("/user-list")
	public List<User> getUserList(){
		return userService.getUserList();
	}
}
